#pragma once
#include <string>
enum class LogType
{
	Console,
	File

};
enum class LogLevel
{
	DEBUG,
	INFO,
	ERROR,
	FATAL
};


bool  LogInit(LogType logtype, std::string format= "{time} {level} {content} {file}:{line}", std::string para="");
void SetLogLevel(LogLevel level);
void LogWrite(LogLevel level, std::string content, std::string file, int line);
#define LOGDEBUG(s) LogWrite(LogLevel::DEBUG,s,__FILE__,__LINE__)
#define LOGINFO(s) LogWrite(LogLevel::INFO,s,__FILE__,__LINE__)
#define LOGERROR(s) LogWrite(LogLevel::ERROR,s,__FILE__,__LINE__)
#define LOGFATAL(s) LogWrite(LogLevel::FATAL,s,__FILE__,__LINE__)
